package com.zhufei.dao;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;

class GlobalsDao {
	static String database = "glszhufei";
	static String database_password = "as19251813";
	static String database_url = "jdbc:mysql://209.190.18.10:3306/glszhufei?characterEncoding=utf-8";
	
	/**
	 * 获取全球唯一id
	 * @return
	 */
	public static String getUUID(){ 
		String s = UUID.randomUUID().toString(); 
		//去掉"-"符号 
		return s.substring(0,8)+s.substring(9,13)+s.substring(14,18)+s.substring(19,23)+s.substring(24); 
		//return s;
	} 

	/**
	 * 获取系统当前时间，格式为yyyy-MM-dd hh:mm:ss
	 * @return
	 */
	public static String getCurrentDateTime(){
		Date date = new Date();
		String dt = new String(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date));
		return dt;
	}

}
